//package com.example.service.impl;
//
//import com.example.entity.dto.CenterWorkLeaderDto;
//import com.example.entity.vo.CenterWorkLeaderInfoVo;
//import com.example.entity.vo.CenterWorkLeaderResultVo;
//import com.example.entity.yifei.CallCenterWorkLeader;
//import com.example.mapper.CallCenterLeaderMapper;
//import com.example.service.CallCenterLeaderService;
//import com.example.untils.JwtUtils;
//import com.example.untils.StringUtils;
//import com.google.common.base.Joiner;
//import org.springframework.beans.BeanUtils;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Service;
//import org.springframework.web.context.request.RequestAttributes;
//import org.springframework.web.context.request.RequestContextHolder;
//import org.springframework.web.context.request.ServletRequestAttributes;
//
//import java.time.LocalDate;
//import java.util.*;
//import java.util.stream.Collectors;
//
//@Service
//public class CallCenterLeaderServiceImpl implements CallCenterLeaderService {
//
//    @Autowired
//    private CallCenterLeaderMapper mapper;
//
//    /**
//     * 获取所有用户信息
//     */
//    public HashMap<String, CenterWorkLeaderInfoVo.UserInfo> allUserInfo(HashSet<String> ids) {
//        return new HashMap<>();
//    }
//
//    /**
//     * 递归完成负责人结构信息
//     *
//     * @param result 返回结果
//     * @param ori         源数据
//     * @param level       当前层级
//     * @param allUserInfo 所有用户信息
//     * @param voUserMap 处理信息和对应用户list
//     * @return
//     */
//    private CenterWorkLeaderResultVo setAllLevel(CenterWorkLeaderResultVo result,List<CenterWorkLeaderInfoVo> ori,
//                                                 Integer level, HashMap<Integer, List<String>> voUserMap,
//                                                 HashMap<String, CenterWorkLeaderInfoVo.UserInfo> allUserInfo) {
//        //当前等级的所有处理信息
//        List<CenterWorkLeaderInfoVo> nowLvList = ori.stream()
//                .filter(item -> item.getLv().equals(level.toString()))
//                .collect(Collectors.toList());
//        if (nowLvList.isEmpty()) return null;
//        nowLvList.forEach(item -> {
//            item.setWorkLeader(new ArrayList<>());
//            //获取当前处理信息对应的处理人ids，遍历从allUserInfo中获取用户信息并存入到处理信息中
//            voUserMap.get(item.getUuid()).forEach(id -> {
//                item.getWorkLeader().add(allUserInfo.get(id));
//            });
//            item.setCreator(allUserInfo.get(item.getCreator().getId()));
//        });
//        return result.setLevel(level.toString()).setList(nowLvList)
//                .setChild(setAllLevel(new CenterWorkLeaderResultVo(), ori, level + 1, voUserMap, allUserInfo));
//    }
//}
